home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / PartMaker 4.4 / PartMaker Documents / Script Runner• / Script Runner•.rsrc / dFRK_5010 < prev    next >
Encoding:
Text File  |  1995-12-12  |  4.6 KB  |  174 lines

  1. /*------------------------------------------------------------------------------
  2.     File:        TextTransferExt.cpp
  3.  
  4.     Contains:    Text Transfer Extension class implementation
  5.  
  6.     Written by:    Andrey Dolgachev
  7.     
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9. ------------------------------------------------------------------------------*/
  10.  
  11. // -- Compiler/Preprocessor Notification --
  12.  
  13. #ifndef _COMPILERDEFS_
  14. #include "CompDefs.h"
  15. #endif
  16.  
  17. // -- OpenDoc Utilities --
  18.  
  19. #ifndef _EXCEPT_
  20. // Exceptions define several important macros (ie. CHECKENV)
  21. // which are used in the SOM method dispatch glue. If Except.h
  22. // is not included early enough, exceptions may not be thrown
  23. // correctly when returning from a SOM method with "ev" parameter set.
  24. #include <Except.h>
  25. #endif
  26.  
  27. // Notification that this is a SOM source file
  28. #define TextTransferExt_Class_Source
  29.  
  30. // define underscore field names (ie. _fSelf)
  31. #define VARIABLE_MACROS
  32.  
  33. // -- TextTransferExt Includes --
  34.  
  35. #ifndef SOM_TextTransferExt_xih
  36. #include "TextTransferExt.xih"
  37. #endif
  38.  
  39. // -- OpenDoc Includes --
  40.  
  41. #ifndef _ODTYPES_
  42. #include <ODTypes.h>
  43. #endif
  44.  
  45. #ifndef SOM_ODExtension_xh
  46. #include <Extensn.xh>
  47. #endif
  48.  
  49.  
  50. #pragma segment TextTransferExt
  51.  
  52.  
  53. //------------------------------------------------------------------------------
  54. // Method:            Release
  55. // Origin:            ODRefCountedObject
  56. //
  57. // Description:        The Release method decrements an object’s reference count
  58. //                    by 1, and tells the draft to release the object from 
  59. //                    memory if the ref count falls to 0. The parent class
  60. //                    must be called at the beginning of this method.
  61. //------------------------------------------------------------------------------
  62. SOM_Scope    void
  63. SOMLINK     TextTransferExt__Release
  64.             (
  65.                 TextTransferExt*    somSelf,
  66.                 Environment*        ev
  67.             )
  68. {
  69.     TextTransferExtMethodDebug("TextTransferExt","Release");
  70.  
  71.     TextTransferExt_parent_SampleCode_DataTransferExt_Release(somSelf, ev);
  72. }
  73.  
  74. //------------------------------------------------------------------------------
  75. // Method:        InitTextTransferExt
  76. // Origin:        TextTransferExt
  77. //------------------------------------------------------------------------------
  78. SOM_Scope    void
  79. SOMLINK        TextTransferExt__InitTextTransferExt
  80.             (
  81.                 TextTransferExt*    somSelf,
  82.                 Environment*        ev,
  83.                 ODPart*             owner
  84.             )
  85. {
  86.     TextTransferExtMethodDebug("TextTransferExt","InitTextTransferExt");
  87.  
  88.     somSelf->InitExtension(ev, owner);
  89. }
  90.  
  91. //------------------------------------------------------------------------------
  92. // Method:        GetSelection
  93. // Origin:        TextTransferExt
  94. //
  95. //------------------------------------------------------------------------------
  96. SOM_Scope    ODBoolean
  97. SOMLINK        TextTransferExt__GetSelection
  98.             (
  99.                 TextTransferExt*    somSelf,
  100.                 Environment*        ev,
  101.                 ODULong*             start,
  102.                 ODULong*             end
  103.             )
  104. {
  105.     TextTransferExtMethodDebug("TextTransferExt", "GetSelection");
  106.     
  107.     ODBoolean    result = kODTrue;
  108.     
  109.     return result;
  110. }
  111.  
  112. //------------------------------------------------------------------------------
  113. // Method:        SetSelection
  114. // Origin:        TextTransferExt
  115. //
  116. // Description:    
  117. //------------------------------------------------------------------------------
  118. SOM_Scope     ODBoolean
  119. SOMLINK     TextTransferExt__SetSelection
  120.             (
  121.                 TextTransferExt*    somSelf,
  122.                 Environment*        ev,
  123.                 ODULong             start,
  124.                 ODULong             end
  125.             )
  126. {
  127.     TextTransferExtMethodDebug("TextTransferExt","SetSelection");
  128.  
  129.     ODBoolean result = kODTrue;
  130.  
  131.     return result;
  132. }
  133.  
  134.  
  135. //------------------------------------------------------------------------------
  136. // Method:        GetData
  137. // Origin:        TextTransferExt
  138. //
  139. // Description:    Call the parent class to retrieve the data from the part.
  140. //------------------------------------------------------------------------------
  141. SOM_Scope    ODBoolean
  142. SOMLINK        TextTransferExt__GetData
  143.             (
  144.                 TextTransferExt*        somSelf,
  145.                 Environment*            ev,
  146.                 ODPlatformType             type,
  147.                 ODByteArray*            data
  148.             )
  149. {
  150.     TextTransferExtMethodDebug("TextTransferExt","TextTransferExt__GetData");
  151.         
  152.     return ( TextTransferExt_parent_SampleCode_DataTransferExt_GetData(somSelf,ev,type,data) );
  153. }
  154.  
  155. //------------------------------------------------------------------------------
  156. // Method:        SetData
  157. // Origin:        TextTransferExt
  158. //
  159. // Description:    Call the parent class to set the part's data to that specified.
  160. //------------------------------------------------------------------------------
  161. SOM_Scope    ODBoolean
  162. SOMLINK        TextTransferExt__SetData
  163.             (
  164.                 TextTransferExt*        somSelf,
  165.                 Environment*            ev,
  166.                 ODPlatformType            type,
  167.                 ODByteArray*             data
  168.             )
  169. {
  170.     TextTransferExtMethodDebug("TextTransferExt","TextTransferExt__SetData");
  171.  
  172.     return ( TextTransferExt_parent_SampleCode_DataTransferExt_SetData(somSelf,ev,type,data) );
  173. }
  174.